#include <cstdio>

int main( )
{
    int n, t, sum, p = 1;
    while ( scanf("%d", &n) != EOF )
    {
        if ( n <= 0 )
            break;
        sum = 0;
        while ( n-- )
        {
            scanf("%d", &t);
            sum += t;
        }
        printf("Sum of #%d is %d\n", p++, sum);
    }
    return 0;
}
